﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wyn.PMS.Common.SecurityControl;

namespace Wyn.PMS.Test.Cache
{
    class LogExceptionTest
    {
        public static void Test()
        {
            //日志示例
            var message = new LogMessage()
            {
                CategoryID = 0,
                EmployeeID = "xiao",
                OrginValue = "0",
                DestValue = "1",
                RelatedID = "o20000003",
                IsSuccess = true,
                HotelID = "2011032",
                Message = "InfoLog"
            };


            OperateLog.InfoLog(message);

            try
            {
                throw new Exception("Error异常中断");
            }
            catch (Exception ex)
            {
                OperateLog.ErrorLog(ex.Message, ex);

            }

            try
            {
                throw new Exception("Warn异常中断");
            }
            catch (Exception ex2)
            {
                OperateLog.WarnLog(ex2.Message, ex2);

            }
        }
    }
}
